<div class="content categories">
  <h1>Categories</h1>

  <form method="post" action="" id="filters_form" class="filters_form">
    <div class="paging_table_container paging_table_order_view_settings admin_articles">
      <span class="angle left_top"></span>
      <span class="angle right_top"></span>
      <label><strong>Language:</strong></label>
      <select class="filter language" name="filter[language]" id="filter_language">
        <option value="">Any</option>
        {html_options options=$languages selected=$language}
      </select>
      <span class="angle right_bottom"></span>
      <span class="angle left_bottom"></span>
    </div>
  </form>

  <div>
    <table class="table_info table_gray_header">
      <thead>
        <tr class="thead">
          <th class="left_column">Name</th>
          <th>Language</th>
          <th>Number of Articles </th>
        </tr>
      </thead>
      <tbody>
        {foreach from=$categories item=category name="categories"}
            <tr>
              <td class="left_column{if $smarty.foreach.categories.last} bottom_row{/if}"><a href="category.html?id={$category.id}">{$category.name}</a></td>
              <td {if $smarty.foreach.categories.last}class="bottom_row"{/if}>{$category.language}</td>
              <td {if $smarty.foreach.categories.last}class="bottom_row"{/if}>{$category.articles_count}</td>
            </tr>
        {foreachelse}
            <tr>
              <td colspan="3" class="bottom_row">There are no categories with selected parameters</td>
            </tr>
        {/foreach}
      </tbody>
    </table>
    <div class="form_buttons_container">
      <div class="form_buttons">
      {include file="include/common_blocks/form_button.tpl" title="Create category" href="/admin/category.html" class="button form_button" id="create_article"}
      </div>
    </div>
  </div>
</div>